package com.zjcode.cdcer.controller;

import com.chinatechstar.component.commons.controller.BaseController;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.CerDataScreenService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:CerDataScreenController
 * @功能：数据大屏
 **/
@RestController
@Slf4j
@RequestMapping("/v1/datascreen/")
public class CerDataScreenController extends BaseController {

    @Autowired
    private CerDataScreenService cerDataScreenService;

    /**
     * 获取数据大屏数据
     *
     * @return
     */
    @PostMapping("getDataScreen")
    public JsonObj getDataScreen() {
        return cerDataScreenService.getDataScreen(getPageData());
    }

    /**
     * 点击地图板块获取对应地区本月份的三癌总数
     */
    @PostMapping("getAreaCancerCount")
    public JsonObj getAreaCancerCount() {
        return cerDataScreenService.getAreaCancerCount(getPageData());
    }
}
